<!--%import("js/resource.js")-->

<div id="popHeader" class="wide">
    <h3 class="xeAdmin">{$lang->search_dependency}</h3>
</div>

<div id="popBody">
    <form action="./" style="text-align:right; margin-bottom:10px;" onsubmit="location.href=location.href.setQuery('search_keyword',jQuery('#search_keyword').get(0).value); return false;">
        <input type="text" class="inputTypeText" name="search_keyword" id="search_keyword" value="{htmlspecialchars($search_keyword)}"/>
        <span class="button"><input type="submit" value="{$lang->cmd_search}" /></span>
    </form>

    <table cellspacing="0" class="crossTable">
    <tr>
        <th style="white-space:nowrap" colspan="2">
            <form action="./" method="get">
            <select name="category_srl" id="category_srl">
                <option value="">{$lang->package_category}</option>
            {@ $_curDepth = 0; }
            <!--@foreach($categories as $key => $val)-->
                <!--@if($val->depth<$_curDepth)-->
                </optgroup>
                <!--@end-->
                <!--@if($val->depth<1)-->
                <!--@if($val->child_count>0)-->
                <optgroup label="{$val->title}">
                <!--@else-->
                <option value="{$val->category_srl}" <!--@if($category_srl == $val->category_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
                <!--@end-->
                <!--@end-->
                <!--@if($val->depth>0)-->
                    <option value="{$val->category_srl}" <!--@if($category_srl == $val->category_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
                <!--@end-->
                {@ $_curDepth = $val->depth}
            <!--@end-->
            <!--@for($i=0;$i<$_curDepth;$i++)--></optgroup><!--@end-->
            </select><a href="#" onclick="location.href=location.href.setQuery('category_srl',jQuery('#category_srl option:selected').val());return false;" class="button small"><span>GO</span></a>
            </form>
        </th>
        <th><div>{$lang->package_path}</div></th>
        <th><div>{$lang->package_version}</div></th>
        <th><div>{$lang->cmd_select}</div></th>
    </tr>
    <!--@foreach($item_list as $key => $val)-->
    <tr>
        <td colspan="2">[{$categories[$val->category_srl]->title}] {$val->title}</td>
        <td>{$val->path}</td>
        <td class="center">{$val->item_version}</td>
        <td class="center"><a href="#" onclick="doInsertDependency({$val->item_srl},'[{$categories[$val->category_srl]->title}] {$val->title} (ver. {$val->item_version})'); return false;" class="buttonSet buttonActive"><span>{$lang->cmd_select}</span></a></td>
    </tr>
    <!--@end-->
    </table>

    <!-- 페이지 네비게이션 -->
    <div class="pagination a1">
        <a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a> 
        <!--@while($page_no = $page_navigation->getNextPage())-->
            <!--@if($page == $page_no)-->
                <strong>{$page_no}</strong> 
            <!--@else-->
                <a href="{getUrl('page',$page_no)}">{$page_no}</a> 
            <!--@end-->
        <!--@end-->
        <a href="{getUrl('page',$page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
    </div>
</div>
